home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_fallrings.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  118 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_radio_chatter.cog
  4. #
  5. # Generic Door Script
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.     #..................MESSAGES................
  15.     message        startup    
  16.     message        entered    
  17.     message        timer    
  18.     
  19.     
  20.     #..................PROPS................
  21.     thing        ring_obj00
  22.     thing        ring_obj01
  23.     thing        ring_obj02
  24.     thing        ring_obj03
  25.     thing        ring_obj04
  26.  
  27.     #..................ACTORS................
  28.     thing        player                                  local
  29.     
  30.         
  31.     #..................TRIGGERS................
  32.     sector        startSECT0                                linkID=2     
  33.     sector        startSECT1                                linkID=2     
  34.  
  35.     sector        endSECT0                                linkID=3     
  36.     sector        endSECT1                                linkID=3     
  37.  
  38.  
  39.     #..................VECTORS................
  40.     vector        ringstart                                local
  41.     vector        ringend                                    local
  42.  
  43.     
  44.     #..................TEMPLATES..........
  45.     template    ring=+ripples                            local
  46.     template    mist=TitanicH2Ofx                        local
  47.     
  48.     #..................VARIABLES................
  49.     int            running=0                                              # whether or not it's running at start
  50.     int            i                                        local        # int for ring
  51.     int            i2                                        local        # int for ring
  52.     int            ring00                                    local        # int for ring
  53.  
  54.     
  55.     
  56. end
  57.  
  58. # ========================================================================================
  59.  
  60. code
  61. startup:
  62.  
  63.     player = GetLocalPlayerThing();
  64.     ringstart    = VectorSet(0.1, 0.1, 1.0);
  65.     ringend    = VectorSet(0.4, 0.4, 0.0);
  66.  
  67.     if (running == 1) 
  68.     {
  69.         SetTimer(0.3);
  70.         SetPulse(0.25);
  71.     }
  72.  
  73. return;
  74.  
  75. # ........................................................................................
  76. entered:
  77.  
  78. if (GetSourceRef() != player) return;
  79.  
  80. if (GetSenderID() == 2)    # start the rings
  81.  
  82.     {
  83.     running = 1;
  84.     SetTimer(0.3);
  85.     SetPulse(0.25);
  86.     }
  87.  
  88. if (GetSenderID() == 3)    # stop the rings
  89.  
  90.     {
  91.     running = 0;
  92.     SetTimer(0.0);
  93.     }
  94.     
  95. return;        
  96. #========================================================
  97. timer:
  98.  
  99.     # rings in 1 of 5 random locations
  100.     i=RandBetween(0,4);
  101.     ring00 = CreateThing(ring, ring_obj00[i]);
  102.     AnimateSpriteSize(ring00, ringstart, ringend, 2.0);
  103.     
  104.     # particles at 1 of 3 random locations near center
  105.     i2=RandBetween(1,3);
  106.     CreateThing(mist, ring_obj00[i2]);
  107.     if(running == 1)
  108.     {
  109.         SetTimer(Rand()/2);
  110.     }
  111.     
  112.  
  113. return;
  114.  
  115. #========================================================
  116. end
  117.  
  118.